<template>
    <div class="son">
        <button @click="lxyEmit('lxy-Event','study is parameter');">click Me</button>
    </div>
</template>
<script setup>
import {onMounted, ref} from 'vue'
const lxyEmit = defineEmits(['lxy-Event'])

// onMounted(()=>{
//     setTimeout(()=>{
//         //父组件传递的事件由子组件变量接收并调用
//         lxyEmit('lxyEvent');
//     },3000);   
// })
</script>
<style scoped>
.son{
    width: 50vw;
    background-color: rgb(255, 251, 0);
}
</style>